package com.example.system.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.system.dto.AuthorityDto;
import com.example.system.entity.Authority;

import java.util.List;

/**
 *
 * @author 王令
 * @since 2022-08-05
 */
public interface IAuthorityService extends IService<Authority> {

    void create(AuthorityDto authorityDto);

    void update(AuthorityDto authorityDto);

    void deleteById(Long id);

    List<Authority> listTreeMenuByRolesId(List<Long> rolesId);

    List<Authority> listPermissionByRolesId(List<Long> rolesId);

    List<Tree<Long>> listWithTreeMenu(List<String> rolesCode);

    List<Tree<Long>> listWithTree();

}
